//
//  ViewController.m
//  UI03_UIView
//
//  Created by aaaaaa on 16/6/7.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "CustomUIView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self createCustomUIView];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



- (void)createCustomUIView{
    
    NSArray *array1 = @[@"用户名", @"密码", @"确认密码", @"电话", @"邮箱"];
    NSArray *array2 = @[@"请输入用户名", @"请输入密码", @"再次输入密码", @"请输入联系方式", @"请输入邮箱"];
    
    
    for (int i = 0; i < array1.count; i++) {
        CustomUIView *customUIView = [[CustomUIView alloc] initWithFrame:CGRectMake(40, 100 + i * 70, 300, 40) withLableText:[array1 objectAtIndex:i] withTextFieldPlaceholdser:[array2 objectAtIndex:i]];
        [self.view addSubview:customUIView];
        [customUIView release];
        
        if (i == 1 || i == 2) {
            customUIView.rightTextField.secureTextEntry = YES;
        }
        
        if (i == 3) {
            customUIView.rightTextField.keyboardType = UIKeyboardTypeNumberPad;
        }
        
    }
    
    
    
    
}





@end
